package geektime.spring.springbucks.service;


import geektime.spring.springbucks.exception.RollbackException;
import geektime.spring.springbucks.model.Coffee;
import org.apache.ibatis.session.RowBounds;

import java.util.List;

public interface CoffeeService {

    int saveCoffee(Coffee coffee);

    Coffee queryById(Long id);

    List<Coffee> queryByIdList(List<Long> ids);

    List<Coffee> findAllWithRowBounds(RowBounds rowBounds);

    List<Coffee> findAllWithParam(int pageNum, int pageSize);

    int updateById(Coffee cofee);

    void updateById2(Coffee cofee) throws RollbackException;

    void updateById3(Coffee cofee);

    int deleteById(Long id);

}
